package baseball;

public class Inning {

	public static final String TOP = "top";
	private int number;
	private int topScore;
	private int bottomScore;

	public Inning(int number) {
		this.number = number;
		this.topScore = 0;
		this.bottomScore = 0;
	}

	public int getNumber() {
		return this.number;
	}

	public void score(String topOrBottom, int score) {
		if(topOrBottom.equals(TOP)) 
			this.topScore += score;
		else
			this.bottomScore += score;
	}

	public int getScore(String topOrBottom) {
		if(topOrBottom.equals(TOP))
			return this.topScore;
		else
			return this.bottomScore;
	}



}
